Image Processing Device with a CSA Accumulator for Improving Image Quality and Related Method

ABSTRACT

An image processing device includes a CSA accumulator, a first register, a CPA adder and a central processing unit. The CSA accumulator includes a first input for receiving a processing signal and a second input for receiving a previous result of the CSA accumulator. The first register includes an input coupled to the CSA accumulator and an output coupled to the second input end of the CSA accumulator. The CPA adder is coupled to the first register. The CPA adder is used for processing an addition operation on all carries outputted from the first register. The central processing unit includes an input coupled to the CPA adder and an output end for outputting an output signal comprising processed image measurement data.

CROSS REFERENCE TO RELATED APPLICATIONS

This is a divisional application of application Ser. No. 11/567,747, filed Dec. 7, 2006.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to image processing devices and related methods for improving image quality, and more particularly, to an image processing device and related method for improving image quality with a Carry-Save-Add (CSA) accumulator.

2. Description of the Prior Art

In digital cameras, digital video cameras, and liquid crystal display (LCD) monitors, color brightness and image stability can be increased by measuring information of original images as a basis for adjustment. Ideally, the information of an entire image would be measured, however insufficient clock speed becomes a problem when gathering the information of the entire image. In the prior art solution, an image is divided into a plurality of frames and a characteristic of each frame is calculated one at a time. This method is effective for static images. However, in dynamic digital video cameras and LCD monitors, a new solution is necessary.

An operating principle of CRT and LCD monitors is generating complete frame control through a horizontal synchronization signal (Hsync) and a vertical synchronization signal (Vsync). An image signal can be produced at an appropriate moment to produce an image on the monitor. Within an image, each frame is produced by an electron gun. After scanning one scan line, the electron gun returns to the beginning of the scan line. Therefore, an image processing device must include a horizontal synchronization signal that tells the electron gun to return after scanning one scan line. After scanning a complete frame, the image processing device outputs the vertical synchronization signal to send the electron gun back to an original vertical position.

Please refer to FIG. 1. FIG. 1 is a diagram of an image processing device for processing image measurement data according to the prior art. After scanning one scan line, the image processing device outputs a horizontal synchronization signal Hsync (the signal Hsync is logic low). After scanning a frame, the image processing device outputs a vertical synchronization signal Vsync (the signal Vsync is logic low). A clock CLK is a signal with a clock period T. During a period of scanning one scan line (the signal Hsync is logic high), the image processing device processes carry-propagate addition (CPA) on image measurement data of a pixel once within the clock period T. A complete addition operation, which includes generating a sum and a carry out, is processed. During a following clock period T, the image processing device processes another complete carry-propagate addition.

Please refer to FIG. 2, which is a diagram of a Carry-Propagate-Adder 22. The Carry-Propagate-Adder 22 includes three inputs. The first input 222 of the Carry-Propagate-Adder 22 is used for receiving a summand A₁, the second input 224 is used for receiving a sum input S_(in) from a preceding Carry-Propagate-Adder, and the third input 226 is used for receiving a carry input C_(in) from the preceding Carry-Propagate-Adder. The Carry-Propagate-Adder 22 includes two outputs. A first output 228 of the Carry-Propagate-Adder 22 is used for outputting a sum output S_(out), and a second output 229 is used for outputting a carry output C_(out). The Carry-Propagate-Adder 22 is used for processing addition on data received from the three inputs. A logic operation of the sum output S_(out) is S_(out)=A₁ΛS_(in)ΛC_(in) which is processing a “NOR” operation on data received from the three inputs. A logic operation of the carry output C_(out) is C_(out) ⁼A₁S_(in)|A₁C_(in)|S_(in)C_(in), which is processing an “AND” operation two-by-two and finally processing an “OR” operation.

In the prior art, the image processing device must process a complete carry-propagate addition within each clock period T, which wastes time. Because current clock speeds are too slow to process image measurement data, an image is divided into several frames to gather information for the whole image. Processing an addition operation on each individual frame and adjusting the individual frames one-by-one leads to poor image quality. If better image quality is required, a complete carry-propagate addition operation must be processed on the image measurement data of the whole image. This improves image quality, but requires more operation time. Therefore, to improve operation speed and to perform more operations within a finite period of time becomes a bottleneck of improving image quality.

SUMMARY OF THE INVENTION

An image processing device for improving image quality according to an embodiment of the present invention includes a Carry-Save-Add (CSA) accumulator, a first register, a Carry-Propagate-Adder (CPA) and a central processing unit (CPU). The CSA accumulator includes a first input for receiving a processing signal and a second input for receiving a previous result of the CSA accumulator. The CSA accumulator is used for processing carry-save addition. The first register includes an input coupled to the CSA accumulator and an output coupled to the second input of the CSA accumulator. The CPA adder is coupled to the first register. The CPA adder is used for processing an addition operation on all carries outputted from the first register. The central processing unit includes an input coupled to the CPA adder and an output for outputting an output signal comprising processed image measurement data.

The claimed invention also provides a method for improving image quality with a Carry-Save-Add (CSA) accumulator. The method includes processing carry-save addition on image measurement data of a pixel once within a predetermined clock period, and processing carry-pass addition once on all carries generated by processing carry-save addition when a vertical synchronization signal is active.

These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.

These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an image processing device for processing image measurement data according to the prior art.

FIG. 2 is a diagram of a Carry-Propagate-Adder (CPA).

FIG. 3 is a diagram of an image processing device for processing image measurement data according to an embodiment of the present invention.

FIG. 4 is a diagram of a circuit utilizing a Carry-Save-Add Accumulator according to the present invention.

FIG. 5 is a diagram of a Carry-Save-Add Accumulator.

FIG. 6 is a diagram of an image processing device according to an embodiment of the present invention.

FIG. 7 is a diagram of another image processing device according to an embodiment of the present invention.

DETAILED DESCRIPTION

Please refer to FIG. 3, which is a diagram of an image processing device for processing image measurement data according to the present invention. After scanning one scan line, the image processing device outputs a horizontal synchronization signal Hsync (the signal Hsync is logic low). After scanning a frame, the image processing device outputs a vertical synchronization signal Vsync (the signal Vsync is logic low). A clock CLK₁ is a signal with a clock period T₁. In one clock period, when scanning one scan line (the signal Hsync is logic high), the image processing device processes carry-save addition (CSA) on image measurement data of a pixel once, and generates a sum and a carry output within the clock period T₁. During a following clock period T₁, the image processing device processes a carry-save addition once, without adding a carry input from a preceding adder. The image processing device processes carry-pass-addition once on all carry outputs generated by processing carry-save addition when the vertical synchronization signal Vsync is active (the signal Vsync is logic low). As shown in FIG. 3, utilizing the CPA carry time required in the prior art to process a complete carry-save addition, the present invention can calculate more image measurement data. Therefore, comparing the image processing device of the present invention with the prior art, the image processing device in the present invention can process more image measurement data within a same period of time.

Please refer to FIG. 4, which is a diagram of a circuit 40 utilizing a carry-save-add accumulator according to the present invention. The circuit 40 includes a carry-save-add accumulator 42, a D Flip-Flop 44, a carry-propagate-adder 46, and a shifter 48. The carry-save-add accumulator 42 includes three inputs. A first input 422 of the carry-save-add accumulator 42 is used for receiving a summand A_(i), a second input 424 is coupled to a second output 448 of the D Flip-Flop 44, and a third input 426 is coupled to a first output 446 of the D Flip-Flop 44. The carry-save-add accumulator 42 includes two outputs. A first output 428 of the carry-save-add accumulator 42 is used for outputting a sum output S, and a second output 429 is used for outputting a carry output C. An input 482 of the shifter 48 is coupled to the second output 429 of the carry-save-add accumulator 42 for receiving the carry output C. The shifter 48 is used for doubling the carry output C, adding one bit “0” behind the carry output C and outputting a second carry output C2. A first input 442 of the D Flip-Flop 44 is coupled to the first output 428 of the carry-save-add accumulator 42 for receiving the sum output S, and a second input 444 of the D Flip-Flop 44 is coupled to an output 484 of the shifter 48 for receiving the second carry output C2. A clock CLK₁ is a signal with a clock period T₁. The D Flip-Flop 44 outputs its result to the outputs 446 and 448 only after one clock period T₁ as passed. The carry-propagate-adder 46 includes two inputs. A first input 462 of the carry-propagate-adder 46 is coupled to the first output 446 of the D Flip-Flop 44 for receiving the sum output S, and a second input 464 of the carry-propagate-adder 46 is coupled to the second output 448 of the D Flip-Flop 44 for receiving the second carry output C2. The carry-propagate-adder 46 is used for adding up data received by these two inputs 462 and 464 to generate a sum output SUM.

Please refer to FIG. 5. FIG. 5 is a diagram of a carry-save-add accumulator 50. The carry-save-add accumulator 50 is an n-bit adder which includes n full adders FA. Each full adder FA includes three inputs for receiving three signals U_(i), V_(i) and W_(i) individually. Each full adder FA is used for processing addition on the three signals U_(i), V_(i) and W_(i) received by the three inputs. A logic operation of sum outputs S₀-S_(n-1) is S_(i)=U_(i)ΛV_(i)ΛW_(i), which is processing a “NOR” operation on data received from these three inputs. A logic operation of carry outputs C₀-C_(n-1) is C_(i)=U_(i)V_(i)|V_(i)W_(i)U_(i)W_(i), which is processing an “AND” operation two-by-two and finally processing an “OR” operation on results of the “AND” operation. The value is in a range from 0 to (n−1).

Please refer to FIG. 6. FIG. 6 is a diagram of an image processing device 60 according to the present invention. The image processing device 60 includes an adjuster 62, a carry-save-add accumulator 64, a first register 66, a carry-propagate-adder 68, a second register 67, and a central processing unit 69. The adjuster 62 includes a first input 622 for receiving a set of image measurement data and a second input 624 coupled to an output 694 of the central processing unit 69 for receiving an output signal D_(out). The adjuster 62 is used for generating a processing signal S_(n) according to the output signal D_(out) and the set of image measurement data. The carry-save-add accumulator 64 includes a first input 642 coupled to an output 626 of the adjuster 62 for receiving the processing signal S_(n) and a second input 644 for receiving a previous result S_((n-1)) outputted from the carry-save-add accumulator 64. The carry-save-add accumulator 64 is used for processing a carry-save-addition operation on data received from the first input 642 and the second input 644. The first register 66 includes an input 662 and an output 664. The input 662 of the first register 66 is coupled to an output 646 of the carry-save-add accumulator 64 and the output 664 of the first register 66 is coupled to a second input 644 of the carry-save-add accumulator 64. The first register 66 can be a D Flip-Flop and has a control end for receiving the clock CLK₁. The clock CLK₁ is a cyclic signal with a clock period T₁. The first register 66 outputs its result to the output 664 only after one clock period T₁ as passed. An input 682 of the carry-propagate-adder 68 is coupled to the output 664 of the first register 66 for receiving a carry from the first register 66. The carry-propagate-adder 68 is used for processing an addition operation on all carries. The carry-propagate-adder 68 processes an addition operation and outputs a result of the addition operation through the output 684 only when one clock period T₁ has passed. The second register 67 includes a first input 672 and an output end 674. The first input 672 of the second register 67 is coupled to an output 684 of the carry-propagate-adder 68, and the output 674 of the second register 67 is coupled to an input 692 of the central processing unit 69. The second register 67 outputs its result to the output 674 only when the vertical synchronization signal Vsync is active (the signal Vsync is logic low). The central processing unit 69 includes an input 692 and an output 694. The input 692 of the central processing unit 69 is coupled to the output 674 of the second register 67, and the output 694 of the central processing unit 69 is coupled to the second input 624 of the adjuster 62 for processing the image measurement data which is calculated and generating the output signal D_(out). The image processing device 60 is a digital camera or a digital video camera. Wherein the image measurement data comprises an image information selected from the group essentially consisting of a luminance information, a gradient information and a chrominance information of an image pixel. In digital cameras and digital video cameras, processing the calculated image measurement data includes performing an image auto white balance (AWB) process, an image auto focus (AF) process, or an image exposure process.

Please refer to FIG. 7, which is a diagram of another image processing device 70 according to the present invention. The image processing device 70 includes an analog-to-digital converter 72, a plurality of delays DL₁-DL_(n), a carry-save-add accumulator 64, a first register 66, a carry-propagate-adder 68, a second register 67, a multiplexer 74, a controller 76, and a central processing unit 69. The analog-to-digital converter 72 is used for converting a received analog input signal into digital data. The plurality of delays DL₁-DL_(n) are coupled to the analog-to-digital converter 72. Each delay DL₁-DL_(n) is used to postpone the digital data by a predetermined clock period. For example, if there are fifteen total delays in a series connection, each delay postpones the digital data by one-sixteenth of the predetermined clock period. Therefore, the postpone time of the predetermined clock period is controlled by controlling a number of delays in the series connection. Further, phase delay of the clock period is also controlled by these delays. This phase delay technology is common enough knowledge to omit unnecessary details.

Please continue to refer to FIG. 7. The multiplexer 74 is coupled to the plurality of delays DL₁-DL_(n) and the central processing unit 69. The multiplexer 74 includes a control end 744. The multiplexer 74 is used to generate a sampling signal for sampling the digital data outputted from the analog-to-digital converter 72 according to a signal received at the control end 744. The controller 76 is coupled to the analog-to-digital converter 72, the multiplexer 74, and the carry-save-add accumulator 64. The controller 76 is used for sampling the digital data to generate the processing signal S_(n) according to the sampling signal. The carry-save-add accumulator 64 includes a first input 642 coupled to an output 764 of the controller 76 for receiving the processing signal S_(n), and a second input 644 for receiving the previous result S_((n-1)) outputted from the carry-save-add accumulator 64. The carry-save-add accumulator 64 is used for processing a carry-save addition operation on data received from these two inputs 642 and 644. The first register 66, the carry-propagate-adder 68, and the second register 67 are similar to the first register 66, the carry-propagate-adder 68, and the second register 67 described in FIG. 6. The central processing unit 69 includes an input 692 and an output 694. The input 692 of the central processing unit 69 is coupled to the output 674 of the second register 67, and the output 694 of the central processing unit 69 is coupled to the control end 744 of the multiplexer 74. The central processing unit 69 is used for processing the image measurement data after calculation and generating the output signal D_(out). The image processing device 70 is a liquid crystal display (LCD). In the liquid crystal display, the image measurement data includes gradient data of an image pixel. Adjusting an image based on the gradient data of image pixels can provide better image quality.

The above-mentioned embodiments illustrate, but do not limit, the present invention. The image processing devices 60 and 70 are not restricted to being a digital camera, a digital video camera, or a liquid crystal display, but could be any other image device. A speed of processing image measurement data is increased by the prevent invention. The image measurement data is not limited to data from an image auto white balance (AWB) process, an image auto focus (AF) process, an image exposure process, luminance data, gradient data, or chrominance data of an image pixel. The image measurement data could be other image measurement data which is not restricted to the embodiments of the present invention.

In conclusion, the present invention provides an image processing device and related method for improving image quality with a Carry-Save-Add (CSA) accumulator. A carry-save addition operation is performed once on the image measurement data of an image pixel during a predetermined clock period. A carry-propagate addition operation is performed once on all carries generated by processing the carry-save addition operation when a vertical synchronization signal is active. Furthermore, the present invention can process tens to hundreds of times the amount of image measurement data by saving the carry time. This helps to improve image quality.

Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims. 

1. A method for improving image quality with a Carry-Save-Add (CSA) accumulator, the method comprising: processing carry-save addition on image measurement data of a pixel once within a predetermined clock period; and processing carry-pass addition once on all carries generated by processing carry-save addition when a vertical synchronization signal is active.
 2. The method of claim 1 further comprising processing a calculated image measurement data after processing the carry-pass addition, wherein processing the calculated image measurement data is performing an image auto white balance (AWB) process, an image auto focus (AF) process, or an image exposure process.
 3. The method of claim 1 wherein the image measurement data comprises an image information selected from a group essentially consisting of a luminance information, a gradient information and a chrominance information of an image pixel. 